<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Superpixel Benchmark: Building CIS</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Superpixel Benchmark
   </div>
   <div id="projectbrief">Superpixel benchmark, tools and algorithms.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Building CIS </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Unfortunately, the code from CIS cannot be shipped with this library due to the restrictive license. Therefore, only a command line tool in <code>cis_cli</code> is provided.</p>
<p>Installation instructions:</p>
<p>Go to <a href="http://www.csd.uwo.ca/faculty/olga/">http://www.csd.uwo.ca/faculty/olga/</a> and download the code.</p>
<p>Extract the archive into <code>lib_cis</code> in order to obtain the following directory structure (where the <code>CMakeLists.txt</code> files are provided by this library): </p><pre class="fragment">lib_cis
|- vlib
    |- include
    |- utils
    |- CMakeLists.txt (provided by this library, not included in the download described above)
|- README.txt (original README)
|- README.md (this README)
|- maxflow.cpp
|- ...
|- superpixels.h (provided by this library, not included in the download described above)
|- CMakeLists.txt (provided by this library, not included in the download described above)
</pre><p>Comment out the <code>main</code> function in <code>superpixels.cpp</code>.</p>
<p>Change the declaration of <code>loadEdges</code> in <code>superpixels.cpp</code> to </p><pre class="fragment">void loadEdges(vector&lt;Value&gt; &amp;weights,int num_pixels,int width,int height,
               Value lambda, vlib::image&lt;unsigned char&gt; *edges)
</pre><p>or use <code>-fpermissive</code> (default) (adapt <code>CMakeLists.txt</code> accordingly).</p>
<p>In <code>loadEdges</code> comment out the following line: </p><pre class="fragment">image&lt;uchar&gt; *edges = loadPGM(name);
</pre><p>Adapt <code>computeWeights</code> to accept an additional parameter named <code>sigma</code>, thereby commenting the following line out: </p><pre class="fragment">float sigma = 2.0f;
</pre><p>Depending on the operating system, some changes in <code>energy.h</code> are required: Change occurrences of </p><pre class="fragment">add_tweights(y, 0, C);
add_edge(x, y, B+C, 0);
</pre><p>to </p><pre class="fragment">this-&gt;add_tweights(y, 0, C);
this-&gt;add_edge(x, y, B+C, 0);
</pre><p>Now use <code>-DBUILD_CIS=On</code> to run CMake (as described in <a class="el" href="BUILDING_8md.html">Building</a>. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Apr 16 2017 16:39:17 for Superpixel Benchmark by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
